package com.qd.push.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 数据推送记录
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_hk_push_log")
public class HkPushLog extends Model<HkPushLog> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private String logId;
    /**
     * 业务ID
     */
    @TableField("bid")
    private String bid;
    /**
     * 分类
     */
    @TableField("classification")
    private String classification;
    /**
     * 内容类型
     */
    @TableField("http_content_type")
    private String httpContentType;
    /**
     * 请求方式
     */
    @TableField("http_method")
    private String httpMethod;
    /**
     * 子分类
     */
    @TableField("child_classification")
    private String childClassification;
    /**
     * 接收时间
     */
    @TableField("receive_time")
    private LocalDateTime receiveTime;
    /**
     * 发送时间
     */
    @TableField("send_time")
    private LocalDateTime sendTime;
    /**
     * 发送状态:0成功1失败
     */
    @TableField("send_state")
    private Integer sendState;
    /**
     * 发送地址
     */
    @TableField("send_url")
    private String sendUrl;
    /**
     * 耗时
     */
    @TableField("time_consumer")
    private Long timeConsumer;
    /**
     * 海康订单ID
     */
    @TableField("bill_code")
    private String billCode;
    /**
     * 停车唯一标识
     */
    @JsonProperty("inUnid")
    @TableField("in_unid")
    private String inUnid;

    public void freeData() {
        this.logId = null;
        this.bid = null;
        this.classification = null;
        this.httpContentType = null;
        this.httpMethod = null;
        this.childClassification = null;
        this.receiveTime = null;
        this.sendTime = null;
        this.sendState = null;
        this.sendUrl = null;
        this.timeConsumer = null;
        this.billCode = null;
        this.inUnid = null;
    }

}
